<?php
namespace app\controller;

use app\BaseController;
use app\model\Dictionary;
use app\utils\NumberDecomposition;
use think\facade\View;

class Index extends BaseController {
    public function index() {
        $tone_1 = (new Dictionary())->where([
            'improved_tone' => 1
        ])->order('weigh desc')->select();
        $tone_2 = (new Dictionary())->where([
            'improved_tone' => 2
        ])->order('weigh desc')->select();
        $tone_3 = (new Dictionary())->where([
            'improved_tone' => 3
        ])->order('weigh desc')->select();
        $tone_4 = (new Dictionary())->where([
            'improved_tone' => 4
        ])->order('weigh desc')->select();
        View::assign('tone_1', $tone_1);
        View::assign('tone_2', $tone_2);
        View::assign('tone_3', $tone_3);
        View::assign('tone_4', $tone_4);
        return View::fetch();
    }
}